from dotenv import load_dotenv

load_dotenv(verbose=True)
from go_main import main
from datetime import datetime
import os


def front(table_name):
    map = {
        "template_name": "gfast前端模板2",
        "table_name": table_name,
        "ouput_path": os.environ.get("front_ouput_path"),
        "primarkName": "platformName"
    }
    datetime.now().strftime("%Y-%m-%d %H-%M %S")
    main(map)


def back(table_name):
    map = {
        "template_name": "gfast模板",
        "table_name": table_name,
        "ouput_path": os.environ.get("back_ouput_path")
        # "ouput_path": r'D:\output'
    }
    datetime.now().strftime("%Y-%m-%d %H-%M %S")
    main(map)


if __name__ == "__main__":
    table_name = "template_node"
    #back(table_name)
    front(table_name)
